package com.shun.upms.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

@Data
public class SysAdminUserDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    private String sauId;

    @ApiModelProperty("用户头像")
    private String sauAvatar;

    @ApiModelProperty("用户名字")
    @Length(min = 2, max = 12)
    private String sauName;

    @ApiModelProperty("用户账号")
    @Length(min = 4, max = 20)
    private String sauAccount;

    @ApiModelProperty("密码")
    @Length(min = 6, max = 24)
    private String sauPassword;

    @ApiModelProperty("md5密码盐")
    private String sauSalt;

    @ApiModelProperty("用户入职日期")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}", message = "不符合日期格式！")
    private String sauEntryDate;

    @ApiModelProperty("性别(字典) 0 女 1 男")
    private String sauSex;

    @ApiModelProperty("电子邮件")
    @Email
    private String sauEmail;

    @ApiModelProperty("电话")
    @Pattern(regexp = "^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}$",message = "不符合电话格式！")
    private String sauPhone;

    @ApiModelProperty("岗位ID")
    private String sauPostId;

    @ApiModelProperty("部门ID")
    private String sauDeptId;

    @ApiModelProperty("状态(字典) 0 正常 1 冻结")
    private String sauStatus;

    @ApiModelProperty("角色列表")
    private List<String> roles;
}
